package com.wgchao.identityrightsmanagement.domain.organization.repository;

import com.wgchao.identityrightsmanagement.domain.BaseRepository;
import com.wgchao.identityrightsmanagement.domain.organization.model.DepartmentOffice;

import java.util.List;

/**
 * @ClassName: DepartmentOfficeRepository
 * @author: wgchao
 * @createTime: 2020/6/8 2:43 PM
 * @Description: TODO
 */
public interface DepartmentOfficeRepository extends BaseRepository<DepartmentOffice, String> {

    //生成唯一标识
    public String generateCode();

    DepartmentOffice findByDepartmentAndOffice(String departmentCode, String officeCode);

    List<DepartmentOffice> findByDepartment(String departmentCode);

    List<DepartmentOffice> findByOffice(String officeCode);

    void deleteAllByDepartment(String departmentCode);

    void deleteAllByOffice(String officeCode);

}
